package com.feibi.study.Utils;

import android.app.Activity;
import android.content.Context;
import android.widget.Toast;


public class ToastUtil {
    public static void showToast(Context context, String value) {
        Toast.makeText(context, value, Toast.LENGTH_SHORT).show();
    }
    public static void showToast(Context context, int res) {
        Toast.makeText(context, context.getString(res), Toast.LENGTH_SHORT).show();
    }

    public static void showToast(Activity activity, String value) {
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(activity, value, Toast.LENGTH_SHORT).show();
            }
        });
    }
}
